package com.zenaprod.zenda.config;


import java.awt.*;

public class Config {
    public static final String APPLICATION_NAME = "Zenda";


    private static Config instance = null;
    private static Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();


    public int x, y;
    public int width, height;
    public int fps;
    public Color bagMenuFrameBg;
    public int boxWidth, boxHeight;
    public int boxPerLine;
    public int bagPadding;


    public static Config getInstance() {
        if (instance == null) {
            instance = new Config();
        }
        return instance;
    }

    private Config() {
        loadConfig();
    }


    public void loadConfig() {
        width = 800;
        height = 600;
        x = (int) ((screenSize.getWidth() - width) / 2);
        y = (int) ((screenSize.getHeight() - height) / 2);
        fps = 60;
        bagMenuFrameBg = new Color(115, 115, 115);

        boxWidth = width / 30;
        boxHeight = width / 30;
        boxPerLine = 4;
        bagPadding = width / 100;
    }


    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }


}
